package org.dtrd.modules.drug.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.drug.entity.po.DtrdExtEmsYwDrugCategory;

import java.util.Date;

/**
 * <p>
 * 药品分类
 * </p>
 *
 * @author QR
 * @since 2021-12-02
 */
@Getter
@Setter
@ApiModel(value = "DrugCategory数据传输", description = "药品分类")
public class DrugCategoryDetail {

    private Integer dataId;

    @ApiModelProperty("栏目名称")
    private String columnName;

    @ApiModelProperty("分类描述")
    private String categoryDesc;

    @ApiModelProperty("创建时间")
    private Date categoryCreateTime;

    @ApiModelProperty("用药方式")
    private Integer catagoryDrugDirection;

    @ApiModelProperty("用药图片")
    private String categoryThumb;

    @ApiModelProperty("分类Id")
    private Integer categoryId;

    @ApiModelProperty("分类名称")
    private String categoryName;

    public DrugCategoryDetail parseFromPo(DtrdExtEmsYwDrugCategory po) {
        dataId = po.getDataId();
        columnName = po.getCategoryName();
        categoryDesc = po.getCategoryDesc();
        categoryCreateTime = po.getCategoryCreateTime();
        catagoryDrugDirection = po.getCatagoryDrugDirection();
        categoryThumb = po.getCategoryThumb();
        categoryId = po.getCategoryPid();
        return this;
    }
}
